package com.ruoyi.management.complaint.mapper;

import com.ruoyi.management.complaint.domain.TOrderEvaluate;
import com.ruoyi.management.complaint.ro.GetComplaintDetailParam;
import com.ruoyi.management.complaint.ro.GetComplaintHandlingParam;
import com.ruoyi.management.complaint.ro.GetComplaintListParam;
import com.ruoyi.management.complaint.vo.GetComplaintDetailVO;
import com.ruoyi.management.complaint.vo.GetComplaintListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 乘客评价Mapper接口
 *
 * @author ruoyi
 * @date 2021-11-29
 */
public interface TOrderEvaluateMapper {
    /**
     * 查询乘客评价列表
     *
     * @param param
     * @return
     */
    List<GetComplaintListVO> selectTOrderEvaluateList(@Param("param") GetComplaintListParam param);

    /**
     * 查询乘客评价详细
     *
     * @param param
     * @return
     */
    GetComplaintDetailVO selectTOrderEvaluateById(@Param("param") GetComplaintDetailParam param);

    /**
     * 投诉处理（企业处理和监管处理，通过判断param中的status）
     *
     * @param param
     * @return
     */
    int complaintHandling(@Param("param") GetComplaintHandlingParam param);

    /**
     * 新增乘客评价
     *
     * @param tOrderEvaluate 乘客评价
     * @return 结果
     */
    int insertTOrderEvaluate(TOrderEvaluate tOrderEvaluate);

    /**
     * 对超时处理的投诉转入监管处理
     * @param overTime
     */
    void changeComplainStatusByOverTime(int overTime);
}
